package com.hqj.demo;

import java.io.Serializable;

public abstract class Questions implements Serializable {

    private static final long serialVersionUID = -202008101741L;
    private String text;
    private String []options;
    private String type;
    private String answer;
    private Integer score;

    public Questions() {}

    public Questions(String text, String[] options, String type, String answer,Integer score) {
        this.text = text;
        this.options = options;
        this.type = type;
        this.answer = answer;
        this.score = score;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String[] getOptions() {
        return options;
    }

    public void setOptions(String[] options) {
        this.options = options;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public void showTitle(){
        System.out.println(""+text+"("+type+":"+score+"分)");
        for(String option:options){
            System.out.print(option+"\t");
        }
        System.out.println();
    }

    public abstract boolean isRight(String answer);
}
